<?php
namespace Admin\Form;
use Zend\Form\Form;
use Zend\Form\Element;

class CreateBillForm extends Form{
	public function __construct($name = ''){
		parent::__construct('CreateBill');
		$this->setAttribute('method','post');
		$this->setAttribute('enctype','multipart/form-data');

		$this->add(array(
           'name'=>'maHang',
           'attributes'=>array(
                'type'=>'text',
                'required'=>'required',
                'id'=>'maHang',
                'class'=>'form-control',
                               ),
           'options'=>array(
				'label'=>'Mã sản phẩm',
				'label_attributes'=>array(
				    'class'=>'col-sm-4 control-label',
					),
				),
           'filters'=>array(
                array('name'=>'StringTrim'),
				),
        ));

        $this->add(array(
           'name'=>'idUser',
           'attributes'=>array(
                'type'=>'text',
                'id'=>'idUser',
                'class'=>'form-control',
                               ),
           'options'=>array(
				'label'=>'SĐT người mua',
				'label_attributes'=>array(
				    'class'=>'col-sm-4 control-label',
					),
				),
           'filters'=>array(
                array('name'=>'StringTrim'),
				),
        ));

        $this->add(array(
           'name'=>'soLuong',
           'attributes'=>array(
                'type'=>'text',
                'required'=>'required',
                'id'=>'soLuong',
                'class'=>'form-control',
                               ),
           'options'=>array(
				'label'=>'Số lượng',
				'label_attributes'=>array(
				    'class'=>'col-sm-4 control-label',
					),
				),
           'filters'=>array(
                array('name'=>'StringTrim'),
				),
        ));

        $this->add(array(
           'name'=>'gia',
           'attributes'=>array(
                'type'=>'text',
                'required'=>'required',
                'id'=>'donGia',
                'class'=>'form-control',
                               ),
           'options'=>array(
				'label'=>'Đơn giá',
				'label_attributes'=>array(
				    'class'=>'col-sm-4 control-label',
					),
				),
           'filters'=>array(
                array('name'=>'StringTrim'),
				),
        ));

        $this->add(array(
           'name'=>'ngay',
           'attributes'=>array(
                'type'=>'date',
                'required'=>'required',
                'id'=>'ngay',
                'class'=>'form-control',
                               ),
           'options'=>array(
        'label'=>'Ngày lập',
        'label_attributes'=>array(
            'class'=>'col-sm-4 control-label',
          ),
        ),
           'filters'=>array(
                array('name'=>'StringTrim'),
        ),
        ));

        $this->add(array(
    		  'name'=>'submit',
    		  'attributes'=>array(
    				'type'=>'submit',
    				'value'=>'Thêm',
    				'id'=>'submit',
    				'class'=>'form-control',
    				'class'=>'btn btn-primary',
    			),
    		));
	}
}